#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int bar(char *arg, char *out)
{
 strcpy(out, arg);
 return 0;
}

int foo(char *argv[])
{
 unsigned int canary[1];
 char buf[100];

 canary[0] = 0xCCCCCCCC;
 bar(argv[1], buf);
 if(canary[0] != 0xCCCCCCCC){
   fprintf(stderr, "target2: The canary died. I'm exiting!\n");
   exit(EXIT_FAILURE);
 }
}

int main(int argc, char *argv[])
{
 if (argc != 2)
   {
     fprintf(stderr, "target2: argc != 2\n");
     exit(EXIT_FAILURE);
   }
 foo(argv);
 return 0;
}

